from django.contrib import admin
from .models import Article,Tags,Category

@admin.register(Tags)
class TagsAdmin(admin.ModelAdmin):
    list_display = ('id', 'tagsName')
    list_display_links = ('id', 'tagsName')

@admin.register(Article)
class ArticleAdmin(admin.ModelAdmin):
    list_display=('id', 'category', 'title', 'user','created_time')
    list_display_links = ('id', 'title')
    fk_fields = ['category']

@admin.register(Category)
class CategoryAdmin(admin.ModelAdmin):
    list_display = ('id', 'categoryName')
    list_display_links = ('id', 'categoryName')


